<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ page import="com.Database.*" %>
<%@ page import="java.sql.*"%>
<%
   String id = request.getParameter("id");
   conDB DB = new conDB();
  // String sql = "select * from personinfo where id = "+id;
  String sql = "select * from personinfo where id = ?";
   DB.connectDB();
  // Statement state = DB.getConnection().createStatement();
  // ResultSet set = state.executeQuery(sql);
  PreparedStatement state = DB.getConnection().prepareStatement(sql);
  state.setObject(1, id);
  ResultSet set = state.executeQuery();
   set.next();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>I更新第一步 查询数据</title>
</head>
<body>
  <form action="FormAction/update.jsp" method="post">
     <label>ID</label>
     <input type="text" name="id" value="<%out.print(set.getString("id"));%>">
     <label>name</label>
     <input type="text" name="name" value="<%out.print(set.getString("name"));%>">
     <label>birthProvince</label>
     <input type="text" name="pro" value="<%out.print(set.getString("birthProvince"));%>">
     <input type="submit" value="提交">
  </form>
</body>
</html>
<%state.close();%>